<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	  xmlns:fs="http://www.wueasy.com">
<head>
	<head th:include="layout :: header" th:remove="tag"/>
	<div th:include="layout :: frame" th:remove="tag"/>
</head>
<body>
<div class="layui-fluid">
  	  	<div class="layui-card">
    		<div class="layui-card-body">
    			<div class="layui-form-query" style="display: none;">
    			<form class="layui-form" id="query_form">
					<div class="layui-form-item">
						<input type="hidden" id="jobName" name="jobName" autocomplete="off" class="layui-input"/>
					</div>
				</form>
				</div>
				<div>
					<button class="layui-btn" function="refresh">
					  <i class="layui-icon layui-icon-refresh-1"></i>刷新
					</button>
		    	</div>
				<table id="fsDatagrid" class="fsDatagrid" lay-filter="fsDatagrid" fs:authorize="" funcNo="S1080" isPage="0" defaultForm="query_form" height="full-90">
				</table>
				
				<div class="fsDatagridCols">
					<p type="numbers" title="#"/>
				    <p field="item" title="分片项" width="100"/>
				    <p field="serverIp" title="服务器ip" width="200"/>
				    <p field="instanceId" title="进程id" width="150"/>
				    <p field="status" title="状态" width="200" dict="jobShardingState"/>
				    <p field="failover" title="支持自动失效转移" width="200" templet="#failover"/>
				     <p fixed="right" align="center" toolbar="#barDemo" title="操作" width="100"/>
				</div>
  <script type="text/html" id="failover">
  {{#  if(d.failover || d.failover == 'true'){ }}
    是
  {{#  } else { }}
    --
  {{#  } }}
	</script>
				<script type="text/html" id="barDemo">
 				 {{#  if(d.status == 'DISABLED'){ }}
					 <a id="qy" class="layui-btn layui-bg-green layui-btn-xs" fs:authorize="" lay-event="submit" isConfirm="1" funcNo="S1082" inputs="jobName:#jobName,item:">生效</a>
				 {{#  } else { }}
					 <a id="sx" class="layui-btn layui-bg-orange layui-btn-xs" fs:authorize="" lay-event="submit" isConfirm="1" funcNo="S1081" inputs="jobName:#jobName,item:">失效</a>
 				 {{#  } }}
				</script>
    		</div>
    	</div>
</div>
</body>
</html>